<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: SBSourceFile.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_s_b_source_file_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">SBSourceFile.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2013-14, Freescale Semiconductor, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without modification,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * are permitted provided that the following conditions are met:</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * o Redistributions of source code must retain the above copyright notice, this list</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *   of conditions and the following disclaimer.</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * o Redistributions in binary form must reproduce the above copyright notice, this</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *   list of conditions and the following disclaimer in the documentation and/or</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *   other materials provided with the distribution.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * o Neither the name of Freescale Semiconductor, Inc. nor the names of its</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *   contributors may be used to endorse or promote products derived from this</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *   software without specific prior written permission.</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#if !defined(_SBSourceFile_h_)</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#define _SBSourceFile_h_</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;blfwk/SourceFile.h&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &quot;blfwk/StELFFile.h&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &quot;blfwk/smart_ptr.h&quot;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;blfwk/DataSource.h&quot;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;blfwk/DataTarget.h&quot;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceblfwk.html">blfwk</a></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;{</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html">   44</a></span>&#160;<span class="keyword">class </span><a class="code" href="classblfwk_1_1_s_b_source_file.html">SBSourceFile</a> : <span class="keyword">public</span> <a class="code" href="classblfwk_1_1_binary_source_file.html">BinarySourceFile</a></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;{</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <a class="code" href="classblfwk_1_1_s_b_source_file.html#adaf9237e59d7ba1f1f5a5deae6b81cad">SBSourceFile</a>(<span class="keyword">const</span> std::string &amp;path);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classblfwk_1_1_s_b_source_file.html#a34638931f3fcb51544475e886530b088">~SBSourceFile</a>();</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classblfwk_1_1_s_b_source_file.html#a5ee5186fcfed23d9f5f3c4b618dde8b5">isSBFile</a>(std::istream &amp;stream);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classblfwk_1_1_data_source.html">DataSource</a> *<a class="code" href="classblfwk_1_1_s_b_source_file.html#a08991961cec05f1c218e9763c35f6f2b">createDataSource</a>();</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a6ef81dace79541684ab94a3a2a63efe7">   64</a></span>&#160;    <span class="keyword">typedef</span> uint8_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#a6ef81dace79541684ab94a3a2a63efe7">cipher_block_t</a>[16];</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a2e02b67443ecac91a6d901f9afcf0609">   67</a></span>&#160;    <span class="keyword">typedef</span> uint8_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#a2e02b67443ecac91a6d901f9afcf0609">sha1_digest_t</a>[20];</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#ac1a4a6417a8eef7751a5a1fc453d2a3a">   70</a></span>&#160;    <span class="keyword">typedef</span> uint32_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#ac1a4a6417a8eef7751a5a1fc453d2a3a">section_id_t</a>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment">// All of these structures are packed to byte alignment in order to match</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="comment">// the structure on disk.</span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">#pragma pack(1)</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html">   77</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="classblfwk_1_1_s_b_source_file.html#structblfwk_1_1_s_b_source_file_1_1version__t">version_t</a></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    {</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        uint16_t m_major;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        uint16_t m_pad0;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        uint16_t m_minor;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        uint16_t m_pad1;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        uint16_t m_revision;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        uint16_t m_pad2;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    };</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html">  106</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="classblfwk_1_1_s_b_source_file.html#structblfwk_1_1_s_b_source_file_1_1boot__image__header__t">boot_image_header_t</a></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    {</div><div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html">  108</a></span>&#160;        <span class="keyword">union</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        {</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;            sha1_digest_t m_digest; </div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html">  111</a></span>&#160;            <span class="keyword">struct</span></div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;            {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                cipher_block_t m_iv; </div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                uint8_t m_extra[4];  </div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;            };</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        };</div><div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a387b340bff829b267384b8f4e8062deb">  117</a></span>&#160;        uint8_t m_signature[4];       </div><div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a67260bd40ec7880fb6ea5e29cc979522">  118</a></span>&#160;        uint8_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#a67260bd40ec7880fb6ea5e29cc979522">m_majorVersion</a>;       </div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#ad1f24f9a0ffacb223d6cbad23c8ec9c1">  119</a></span>&#160;        uint8_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#ad1f24f9a0ffacb223d6cbad23c8ec9c1">m_minorVersion</a>;       </div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#aa4fc077ce97c630662d713ab01a8c8e9">  120</a></span>&#160;        uint16_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#aa4fc077ce97c630662d713ab01a8c8e9">m_flags</a>;             </div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#aec500ce5d5a444fc178765e6d99096e1">  121</a></span>&#160;        uint32_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#aec500ce5d5a444fc178765e6d99096e1">m_imageBlocks</a>;       </div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#ae8b6105d7f29d4b2c66f99468077e0d1">  122</a></span>&#160;        uint32_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#ae8b6105d7f29d4b2c66f99468077e0d1">m_firstBootTagBlock</a>; </div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a0654982842618a0deab073e1432b9044">  123</a></span>&#160;        section_id_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#a0654982842618a0deab073e1432b9044">m_firstBootableSectionID</a>; </div><div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a25879fac38e20bc4ab77a3c08f0a7ba1">  124</a></span>&#160;        uint16_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#a25879fac38e20bc4ab77a3c08f0a7ba1">m_keyCount</a>;                   </div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#ad9d6a7dd03f3752cf245e330b749a590">  125</a></span>&#160;        uint16_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#ad9d6a7dd03f3752cf245e330b749a590">m_keyDictionaryBlock</a>;         </div><div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#ab3fc11a5c29d6fecb3962440d10c2949">  126</a></span>&#160;        uint16_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#ab3fc11a5c29d6fecb3962440d10c2949">m_headerBlocks</a>;               </div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a5ce9bf896e573840e97de37ac5dceb01">  127</a></span>&#160;        uint16_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#a5ce9bf896e573840e97de37ac5dceb01">m_sectionCount</a>;               </div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#ae39259ad11f9461a9a98ee7cc3db091e">  128</a></span>&#160;        uint16_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#ae39259ad11f9461a9a98ee7cc3db091e">m_sectionHeaderSize</a>;          </div><div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#adf0faf96e82e7286dd66ead875c23a51">  129</a></span>&#160;        uint8_t m_padding0[2];                 </div><div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a5a0661b1a0bd0dbb4ad03879454ba279">  130</a></span>&#160;        uint8_t m_signature2[4];      </div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        uint64_t m_timestamp;         </div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a681e4f4abee8afe9bc37da7c18f4cce6">  133</a></span>&#160;        <a class="code" href="classblfwk_1_1_s_b_source_file.html#structblfwk_1_1_s_b_source_file_1_1version__t">version_t</a> <a class="code" href="classblfwk_1_1_s_b_source_file.html#a681e4f4abee8afe9bc37da7c18f4cce6">m_productVersion</a>;   </div><div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a77e4462dae9a541d364fcf969e90c6e1">  134</a></span>&#160;        <a class="code" href="classblfwk_1_1_s_b_source_file.html#structblfwk_1_1_s_b_source_file_1_1version__t">version_t</a> <a class="code" href="classblfwk_1_1_s_b_source_file.html#a77e4462dae9a541d364fcf969e90c6e1">m_componentVersion</a>; </div><div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#a4442d6f71cd5edb035924ec133a5c7b8">  135</a></span>&#160;        uint16_t <a class="code" href="classblfwk_1_1_s_b_source_file.html#a4442d6f71cd5edb035924ec133a5c7b8">m_driveTag</a>;          </div><div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file.html#ab38c13fc12441eaa289210194a7a3920">  136</a></span>&#160;        uint8_t m_padding1[6];        </div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    };</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="preprocessor">#pragma pack()</span></div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file_1_1_s_b_file_exception.html">  145</a></span>&#160;    <span class="keyword">class </span><a class="code" href="classblfwk_1_1_s_b_source_file_1_1_s_b_file_exception.html">SBFileException</a> : <span class="keyword">public</span> std::runtime_error</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    {</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classblfwk_1_1_s_b_source_file_1_1_s_b_file_exception.html#a9d6a616c1674ee2c73fbc7e7858bfe9e">  149</a></span>&#160;        <a class="code" href="classblfwk_1_1_s_b_source_file_1_1_s_b_file_exception.html#a9d6a616c1674ee2c73fbc7e7858bfe9e">SBFileException</a>(<span class="keyword">const</span> std::string &amp;inMessage)</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;            : <a class="code" href="namespacestd.html">std</a>::runtime_error(inMessage)</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        {</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        }</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    };</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;};</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;}; <span class="comment">// namespace blfwk</span></div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="preprocessor">#endif // _SBSourceFile_h_</span></div><div class="ttc" id="classblfwk_1_1_s_b_source_file_html_structblfwk_1_1_s_b_source_file_1_1version__t"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#structblfwk_1_1_s_b_source_file_1_1version__t">blfwk::SBSourceFile::version_t</a></div><div class="ttdoc">Same version struct used for 3600 boot image. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:77</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html">blfwk::SBSourceFile</a></div><div class="ttdoc">SB Format (SB) source file. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:44</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_ae39259ad11f9461a9a98ee7cc3db091e"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#ae39259ad11f9461a9a98ee7cc3db091e">blfwk::SBSourceFile::boot_image_header_t::m_sectionHeaderSize</a></div><div class="ttdeci">uint16_t m_sectionHeaderSize</div><div class="ttdoc">Size in blocks of a section header. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:128</div></div>
<div class="ttc" id="namespaceblfwk_html"><div class="ttname"><a href="namespaceblfwk.html">blfwk</a></div><div class="ttdef"><b>Definition:</b> BlfwkErrors.h:16</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_aa4fc077ce97c630662d713ab01a8c8e9"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#aa4fc077ce97c630662d713ab01a8c8e9">blfwk::SBSourceFile::boot_image_header_t::m_flags</a></div><div class="ttdeci">uint16_t m_flags</div><div class="ttdoc">Flags or options associated with the entire image. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:120</div></div>
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace. </div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_1_1_s_b_file_exception_html"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file_1_1_s_b_file_exception.html">blfwk::SBSourceFile::SBFileException</a></div><div class="ttdoc">Simple exception thrown to indicate an error in the input SB file format. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:145</div></div>
<div class="ttc" id="classblfwk_1_1_binary_source_file_html"><div class="ttname"><a href="classblfwk_1_1_binary_source_file.html">blfwk::BinarySourceFile</a></div><div class="ttdoc">Binary data file. </div><div class="ttdef"><b>Definition:</b> src/blfwk/SourceFile.h:165</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a0654982842618a0deab073e1432b9044"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a0654982842618a0deab073e1432b9044">blfwk::SBSourceFile::boot_image_header_t::m_firstBootableSectionID</a></div><div class="ttdeci">section_id_t m_firstBootableSectionID</div><div class="ttdoc">ID of section to start booting from. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:123</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_ab3fc11a5c29d6fecb3962440d10c2949"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#ab3fc11a5c29d6fecb3962440d10c2949">blfwk::SBSourceFile::boot_image_header_t::m_headerBlocks</a></div><div class="ttdeci">uint16_t m_headerBlocks</div><div class="ttdoc">Size of this header, including this size word, in blocks. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:126</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a25879fac38e20bc4ab77a3c08f0a7ba1"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a25879fac38e20bc4ab77a3c08f0a7ba1">blfwk::SBSourceFile::boot_image_header_t::m_keyCount</a></div><div class="ttdeci">uint16_t m_keyCount</div><div class="ttdoc">Number of entries in DEK dictionary. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:124</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a5ee5186fcfed23d9f5f3c4b618dde8b5"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a5ee5186fcfed23d9f5f3c4b618dde8b5">blfwk::SBSourceFile::isSBFile</a></div><div class="ttdeci">static bool isSBFile(std::istream &amp;stream)</div><div class="ttdoc">Identifies whether the stream contains an SB file. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.cpp:51</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a77e4462dae9a541d364fcf969e90c6e1"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a77e4462dae9a541d364fcf969e90c6e1">blfwk::SBSourceFile::boot_image_header_t::m_componentVersion</a></div><div class="ttdeci">version_t m_componentVersion</div><div class="ttdoc">Component version. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:134</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_adaf9237e59d7ba1f1f5a5deae6b81cad"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#adaf9237e59d7ba1f1f5a5deae6b81cad">blfwk::SBSourceFile::SBSourceFile</a></div><div class="ttdeci">SBSourceFile(const std::string &amp;path)</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.cpp:42</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_ac1a4a6417a8eef7751a5a1fc453d2a3a"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#ac1a4a6417a8eef7751a5a1fc453d2a3a">blfwk::SBSourceFile::section_id_t</a></div><div class="ttdeci">uint32_t section_id_t</div><div class="ttdoc">Unique identifier type for a section. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:70</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a67260bd40ec7880fb6ea5e29cc979522"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a67260bd40ec7880fb6ea5e29cc979522">blfwk::SBSourceFile::boot_image_header_t::m_majorVersion</a></div><div class="ttdeci">uint8_t m_majorVersion</div><div class="ttdoc">Major version for the image format, see #ROM_BOOT_IMAGE_MAJOR_VERSION. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:118</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a4442d6f71cd5edb035924ec133a5c7b8"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a4442d6f71cd5edb035924ec133a5c7b8">blfwk::SBSourceFile::boot_image_header_t::m_driveTag</a></div><div class="ttdeci">uint16_t m_driveTag</div><div class="ttdoc">Drive tag for the system drive which this boot image belongs to. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:135</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a34638931f3fcb51544475e886530b088"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a34638931f3fcb51544475e886530b088">blfwk::SBSourceFile::~SBSourceFile</a></div><div class="ttdeci">virtual ~SBSourceFile()</div><div class="ttdoc">Destructor. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.cpp:47</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_aec500ce5d5a444fc178765e6d99096e1"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#aec500ce5d5a444fc178765e6d99096e1">blfwk::SBSourceFile::boot_image_header_t::m_imageBlocks</a></div><div class="ttdeci">uint32_t m_imageBlocks</div><div class="ttdoc">Size of entire image in blocks. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:121</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a5ce9bf896e573840e97de37ac5dceb01"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a5ce9bf896e573840e97de37ac5dceb01">blfwk::SBSourceFile::boot_image_header_t::m_sectionCount</a></div><div class="ttdeci">uint16_t m_sectionCount</div><div class="ttdoc">Number of section headers in this table. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:127</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_1_1_s_b_file_exception_html_a9d6a616c1674ee2c73fbc7e7858bfe9e"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file_1_1_s_b_file_exception.html#a9d6a616c1674ee2c73fbc7e7858bfe9e">blfwk::SBSourceFile::SBFileException::SBFileException</a></div><div class="ttdeci">SBFileException(const std::string &amp;inMessage)</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:149</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_ae8b6105d7f29d4b2c66f99468077e0d1"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#ae8b6105d7f29d4b2c66f99468077e0d1">blfwk::SBSourceFile::boot_image_header_t::m_firstBootTagBlock</a></div><div class="ttdeci">uint32_t m_firstBootTagBlock</div><div class="ttdoc">Offset from start of file to the first boot tag, in blocks. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:122</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a08991961cec05f1c218e9763c35f6f2b"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a08991961cec05f1c218e9763c35f6f2b">blfwk::SBSourceFile::createDataSource</a></div><div class="ttdeci">virtual DataSource * createDataSource()</div><div class="ttdoc">Creates an unmapped data source from the entire file. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.cpp:99</div></div>
<div class="ttc" id="classblfwk_1_1_data_source_html"><div class="ttname"><a href="classblfwk_1_1_data_source.html">blfwk::DataSource</a></div><div class="ttdoc">Abstract base class for data sources. </div><div class="ttdef"><b>Definition:</b> src/blfwk/DataSource.h:56</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a681e4f4abee8afe9bc37da7c18f4cce6"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a681e4f4abee8afe9bc37da7c18f4cce6">blfwk::SBSourceFile::boot_image_header_t::m_productVersion</a></div><div class="ttdeci">version_t m_productVersion</div><div class="ttdoc">Product version. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:133</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a6ef81dace79541684ab94a3a2a63efe7"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a6ef81dace79541684ab94a3a2a63efe7">blfwk::SBSourceFile::cipher_block_t</a></div><div class="ttdeci">uint8_t cipher_block_t[16]</div><div class="ttdoc">An AES-128 cipher block is 16 bytes. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:64</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_ad9d6a7dd03f3752cf245e330b749a590"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#ad9d6a7dd03f3752cf245e330b749a590">blfwk::SBSourceFile::boot_image_header_t::m_keyDictionaryBlock</a></div><div class="ttdeci">uint16_t m_keyDictionaryBlock</div><div class="ttdoc">Starting block number for the key dictionary. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:125</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_a2e02b67443ecac91a6d901f9afcf0609"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#a2e02b67443ecac91a6d901f9afcf0609">blfwk::SBSourceFile::sha1_digest_t</a></div><div class="ttdeci">uint8_t sha1_digest_t[20]</div><div class="ttdoc">A SHA-1 digest is 160 bits, or 20 bytes. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:67</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_ad1f24f9a0ffacb223d6cbad23c8ec9c1"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#ad1f24f9a0ffacb223d6cbad23c8ec9c1">blfwk::SBSourceFile::boot_image_header_t::m_minorVersion</a></div><div class="ttdeci">uint8_t m_minorVersion</div><div class="ttdoc">Minor version of the boot image format, see #ROM_BOOT_IMAGE_MINOR_VERSION. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:119</div></div>
<div class="ttc" id="classblfwk_1_1_s_b_source_file_html_structblfwk_1_1_s_b_source_file_1_1boot__image__header__t"><div class="ttname"><a href="classblfwk_1_1_s_b_source_file.html#structblfwk_1_1_s_b_source_file_1_1boot__image__header__t">blfwk::SBSourceFile::boot_image_header_t</a></div><div class="ttdoc">Header for the entire boot image. </div><div class="ttdef"><b>Definition:</b> SBSourceFile.h:106</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_80fb9e53c172a775cab667063273d0e3.html">blfwk</a></li><li class="navelem"><b>SBSourceFile.h</b></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:50 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
